package demo.spring.restful.domain;

public class Computer {
	private long id;
	private String brand;
	private String modelNumber;
	private int ram;
	private int storage;

	public Computer() {
		id = 0;
	}

	public Computer(long id, String brand, String modelNumber, int ram, int storage) {
		this.id = id;
		this.brand = brand;
		this.modelNumber = modelNumber;
		this.ram = ram;
		this.storage = storage;
	}

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getBrand() {
		return brand;
	}

	public void setBrand(String brand) {
		this.brand = brand;
	}

	public String getModelNumber() {
		return modelNumber;
	}

	public void setModelNumber(String modelNumber) {
		this.modelNumber = modelNumber;
	}

	public int getRam() {
		return ram;
	}

	public void setRam(int ram) {
		this.ram = ram;
	}

	public int getStorage() {
		return storage;
	}

	public void setStorage(int storage) {
		this.storage = storage;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + (int) (id ^ (id >>> 32));
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Computer other = (Computer) obj;
		if (id != other.id)
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "User [id=" + id + ", brand=" + brand + ", modelNumber=" + modelNumber + ", ram=" + ram + "G"
				+ ",storage=" + storage + "G" + "]";
	}
}
